wayland: Handle after-paint invocations when nothing was painted
authorJonas Ådahl <jadahl@gmail.com>
Tue, 16 Feb 2016 04:41:57 +0000 (12:41 +0800)
committerRay Strode <rstrode@redhat.com>
Tue, 16 Feb 2016 21:22:51 +0000 (16:22 -0500)
commit64c9ec14fea2a68377f7a9c5297fb24b365bf50e
tree712bf81b2fec69475d698455ba96112ada5d4868
parentf945fb6ec40db6da31be17703f8c67345ea2e1fe
wayland: Handle after-paint invocations when nothing was painted

If a after-paint was scheduled but nothing was painted, for example when
the it was scheduled by a subsurface wanting to update its position,
we'd still try to read back from the backfill cairo surface and update
the committed cairo surface reference even though no buffer was
attached.

Fix this by adding a new state, 'pending_buffer_attached', which is only
true if a buffer was attached during frame. Only when this is true will
the backfill be read back and the committed cairo surface reference be
updated.

https://bugzilla.gnome.org/show_bug.cgi?id=762120
gdk/wayland/gdkwindow-wayland.c